package com.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.model.OrderDetail;
import com.service.OrderDetailService;


@RestController
public class Controller {
	
    @Autowired
    private OrderDetailService service;   
	
	@RequestMapping(value = "/getOrderDetailById/{orderId}", method = RequestMethod.GET)
	public OrderDetail getOrderDetailById(@PathVariable("orderId") String orderId) throws Exception {
		return service.getOrderDetailByID(orderId);
	}
}
